#ifndef _SOUND_H_
#define _SOUND_H_

#ifdef _WIN32
#pragma once
#endif

#include <string>

#include "fmod.hpp"

using std::string;

using std::max;
using std::min;

using FMOD::Sound;
using FMOD::System;
using FMOD::Channel;

class CSound
{
public:
    CSound(System *pSystem, const string &szPath, bool bStream=false);
    ~CSound();

    void createNewChannel(Channel **pChannel);

    void setVolume(float fVolume);
    float getVolume() const;

    void setMasterVolume(float fMasterVolume);

    void setMute(bool bMute);

private:
    bool m_bStream;

    bool m_bMute;

    float m_fMasterVolume;

    string m_szPath;
    Sound *m_pSound;
    System *m_pSystem;

    float m_fVolume;
};

#endif